package graphic;

import java.nio.DoubleBuffer;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import org.lwjgl.BufferUtils;

/**
 *  
 * @author Marcin & Bartek
 * 
 * @description not used
 * 
 */
public final class Buffers {
    private Buffers(){}
    public static FloatBuffer floatBuffer(float d[]) {
        FloatBuffer fb = BufferUtils.createFloatBuffer(d.length);
        fb.put(d);
        fb.flip();
        return fb;
     } 
    public static IntBuffer intBuffer(int d[]) {
        IntBuffer ib = BufferUtils.createIntBuffer(d.length);
        ib.put(d);
        ib.flip();
        return ib;
     }
    public static DoubleBuffer doubleBuffer(double d[]) {
        DoubleBuffer db = BufferUtils.createDoubleBuffer(d.length);
        db.put(d);
        db.flip();
        return db;
     }
}
